package com.sjh.test.java8.time;

import java.time.LocalDate;
import java.time.LocalTime;
import java.time.ZonedDateTime;

public class ZonedDateTimeTest1 {

    public static void main(String args[]) {
        ZonedDateTimeTest1 tester = new ZonedDateTimeTest1();
        tester.run();
    }

    public void run() {

        ZonedDateTime now = ZonedDateTime.now();
        System.out.println("当前日期时间是:" + now);

        LocalDate date = now.toLocalDate();
        System.out.println("本地日期是:" + now);

        LocalTime time = now.toLocalTime();
        System.out.println("本地时间是:" + time);


    }
}
